//
// core - server core source code.
//
// $Rev$
// $Author$
// $Date$
//
// Define some callback.
//

#ifndef __CALLBACK__H
#define __CALLBACK__H

#include <boost/function.hpp>

namespace core {

class ByteBufferDynamic;
class InetAddress;
class TCPConnection;
class TimeTick;

typedef ByteBufferDynamic Buffer;

typedef boost::function<void ()> SignalCallback;
typedef boost::function<void ()> EventLoopCallback;
typedef boost::function<void (int, const InetAddress &)> NewConnectionCallback;

typedef boost::function<void ()> CommonEventCallback;
typedef boost::function<void (const TimeTick &)> ReadEventCallback;

typedef boost::function<void (TCPConnection *)> ConnectionCallback;
typedef boost::function<void (TCPConnection *)> CloseCallback;
typedef boost::function<void (TCPConnection *, Buffer &, const TimeTick &)> MessageCallback;
typedef boost::function<void (TCPConnection *)> WriteCompleteCallback;

}  // namespace core

#endif  // __CALLBACK__H

